package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Author yichao
 * Time  2018/2/28 17:43
 * Dest  商品分类
 */

public class ClassifyBean implements Parcelable{
        /**
         * children : [{"children":[{"children":[{"id":899,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/37c82002-bea2-4f0d-a6f5-24531b91733e.jpg","name":"北欧风格 抛光实木内架棉麻布艺左转角沙发（3+左贵妃）","price":5000},{"id":875,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/c0bf5ba6-f0e7-4164-9a15-ac8329f7a4f4.jpg","name":"古欧 美式圆餐桌简美餐台简约欧式风格餐厅家具奢华实木餐桌GU120","price":20000}],"name":"全部"}],"name":"推荐商品"},{"id":738,"name":"鼎高"},{"id":744,"name":"宜家"}]
         * id : 690
         * name : 家具
         */
        private int id;
        private String name;
        private List<ChildrenBeanXX> children;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<ChildrenBeanXX> getChildren() {
            return children;
        }

        public void setChildren(List<ChildrenBeanXX> children) {
            this.children = children;
        }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.name);
        dest.writeList(this.children);
    }

    public ClassifyBean() {
    }

    protected ClassifyBean(Parcel in) {
        this.id = in.readInt();
        this.name = in.readString();
        this.children = new ArrayList<ChildrenBeanXX>();
        in.readList(this.children, ChildrenBeanXX.class.getClassLoader());
    }

    public static final Creator<ClassifyBean> CREATOR = new Creator<ClassifyBean>() {
        @Override
        public ClassifyBean createFromParcel(Parcel source) {
            return new ClassifyBean(source);
        }

        @Override
        public ClassifyBean[] newArray(int size) {
            return new ClassifyBean[size];
        }
    };
}

